<?php


namespace app\shop\validate;

use think\Validate;

/**
 * 订单验证器
 * Class Order
 * @package app\Goods\validate
 * @author Mr.Liu
 * @create 2021-10-25 14:23
 */
class Refund extends Validate
{

    /**
     * 验证规则
     * @var string[]
     */
    protected $rule = [
        'sale_id'          => 'require',
        'type'              => 'require',
        'uid'              => 'require',
        'shop_id'              => 'require',
        'goodsList'              => 'require',
        'consignee'        => 'require',
        'deal_time'       => 'require'
    ];

    /**
     * 错误信息
     * @var string[]
     */
    protected $message = [
        'sale_id.require'       => '护理师（开单人）必须选择',
        'type.require'           => '订单类型必须选择',
        'uid.require'           => '下单客户必须选择',
        'consignee.require'     => '联系人不能为空',
        'shop_id.require'     => '门店必须选择',
        'goodsList.require'     => '请添加明细信息',
        'deal_time.require'    => '成交日期必须选择'
    ];


    protected $scene = [
        'createOrder'       => ['uid','type','consignee','shop_id','goodsList','deal_time'],
        'createGoods'       => ['uid','sale_id','type','consignee','shop_id','goodsList','deal_time']
    ];
}
